1
00:00:00,420 --> 00:00:06,770
In this lesson we're going to start up our Jupiter notebook and we're also going to grab the data set.

2
00:00:06,780 --> 00:00:07,260
All right.

3
00:00:07,280 --> 00:00:16,410
So in your project folder go to New Python 3 start up that you notebook and let's rename this thing

4
00:00:16,830 --> 00:00:28,990
from C untitled to 10 neural nets hyphen carries sofar 10 classification.

5
00:00:29,010 --> 00:00:37,470
Now let's hit rename and then let's insert some markdown cells that first one impulse and Let's insert

6
00:00:37,470 --> 00:00:42,160
another one that shall read get the data.

7
00:00:42,270 --> 00:00:48,500
Now let's find out if the tensor flow and cares installation worked properly.

8
00:00:48,510 --> 00:00:54,390
However one thing I want to mention is that as part of this module there's going to be a lot of random

9
00:00:54,390 --> 00:01:00,390
numbers that are going to be generated and used behind the scenes both by Caris and by tensor flow.

10
00:01:00,690 --> 00:01:04,080
Now these random numbers are gonna be part of the algorithms that are going to be used.

11
00:01:04,140 --> 00:01:10,110
And if you and I don't have the same starting point if you don't have the same seed for these random

12
00:01:10,110 --> 00:01:13,140
numbers then we might get very different results.

13
00:01:13,140 --> 00:01:21,240
So in order for this module and for this work to be reproducible and to avoid confusion if you get some

14
00:01:21,510 --> 00:01:27,900
different numbers string up we should both set the same seed in the very beginning of this notebook

15
00:01:28,380 --> 00:01:38,310
so we'll set from num pi dot random import seed and then we'll set this number pi seed to lucky number

16
00:01:38,310 --> 00:01:39,990
like eight eight eight.

17
00:01:40,590 --> 00:01:46,920
So Caris will actually look two words num PI for its random numbers and we can set the seed here like

18
00:01:46,920 --> 00:01:47,730
so.

19
00:01:48,090 --> 00:01:56,620
And then from tensor flow we're going to import set underscore random underscore seed and we're going

20
00:01:56,620 --> 00:02:03,180
to call this method here set on a scale random underscore seed and we'll provide another lucky number

21
00:02:03,420 --> 00:02:09,420
say like 4 or 4 let's hit shift enter on this and add a new cell below.

22
00:02:09,420 --> 00:02:14,310
Here we can import a few things that we're gonna need like we're going to import os we're gonna import

23
00:02:14,730 --> 00:02:23,340
num pi as MP We're gonna import tensor flow as TAF and we want to import Caris.

24
00:02:23,520 --> 00:02:28,960
So let's hit shift enter on the cell now and see if this works.

25
00:02:28,970 --> 00:02:34,020
Now if you managed to install the tensor flow and the cares packages properly then you should get something

26
00:02:34,020 --> 00:02:37,970
similar to what I'm seeing where it says using tensor flow back end.

27
00:02:38,040 --> 00:02:44,250
This is a message from carers because carers can actually run on a number of different technologies.

28
00:02:44,280 --> 00:02:49,740
We're gonna be using tensor flow to power across the image data set that we'll be using in this module

29
00:02:49,830 --> 00:02:52,050
is called sofar 10.

30
00:02:52,200 --> 00:03:00,480
It contains 60000 images from 10 different classes including things like ships horses and trucks.

31
00:03:00,480 --> 00:03:05,520
It's a data set that's commonly used to train image recognition models and that's exactly what we'll

32
00:03:05,520 --> 00:03:07,700
be doing to get the data.

33
00:03:07,710 --> 00:03:13,530
You'd probably have to go to somewhere like C.S. thought Toronto dot edu and this is the website of

34
00:03:13,530 --> 00:03:19,040
a chap called Alex Chris Chayefsky who's got the zip files here for you to download.

35
00:03:19,200 --> 00:03:22,950
But our life is actually gonna be much easier than that.

36
00:03:23,010 --> 00:03:31,400
Thanks to Chris because all we have to do is in our input statements we'll see from Chris thought datasets

37
00:03:31,800 --> 00:03:34,960
import and then sofar 10.

38
00:03:35,040 --> 00:03:36,560
This is the one we're gonna go for.

39
00:03:36,570 --> 00:03:44,490
So if I had shift into here then I can import the data by writing sofar 10 dot and then load on the

40
00:03:44,490 --> 00:03:47,510
score data parentheses.

41
00:03:47,550 --> 00:03:54,450
Now what's very interesting about this is that this will actually return a tuple for me.

42
00:03:54,570 --> 00:04:00,480
If you pull up the quick documentation you can see that we actually get to tuples one for the training

43
00:04:00,480 --> 00:04:02,730
data and one for the test data.

44
00:04:03,150 --> 00:04:09,030
So what we actually want to do is we want to store all this information like so.

45
00:04:09,360 --> 00:04:17,100
So I'll set up my tuple with some parentheses and I'm going to store my training data in X on a squat

46
00:04:17,110 --> 00:04:23,210
train underscore all and then I'll have a comma here and I'll say why on a squat train on the square

47
00:04:23,270 --> 00:04:23,780
all.

48
00:04:24,210 --> 00:04:31,770
And my test data store under X on a score test come up y on a score test.

49
00:04:31,770 --> 00:04:37,080
So this load data method from this carries data set will give us two tuples.

50
00:04:37,080 --> 00:04:45,150
This one here and this one hit and hitting shift and her on the cell will download all the data for

51
00:04:45,150 --> 00:04:45,490
us.

52
00:04:45,510 --> 00:04:50,660
That's pretty handy right here if you're a little bit more curious and are wondering what the CFR 10

53
00:04:50,670 --> 00:04:51,970
thing actually is.

54
00:04:52,080 --> 00:04:59,190
Then you'll see that this is a module and if you're wondering what we get back from the load data method

55
00:04:59,800 --> 00:05:05,640
with a type X going to sort of train underscore all you'll see that we get back a numb pie array.
